From: David Härdeman Date: Tue, 21 Oct 2025 20:03:29 +0000 (+0200) Subject: luci-mod-network: remove customi18n() from dhcp.js X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=495380a926600d38f05ad302bf053f69647d4435;p=project%2Fluci.git luci-mod-network: remove customi18n() from dhcp.js The single user isn't really enough to warrant this function, so remove it to prepare for the following patches. Signed-off-by: David Härdeman --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index e887b483c5..1175e3ecfc 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -235,16 +235,6 @@ return view.extend({ var has_dhcpv6 = L.hasSystemFeature('dnsmasq', 'dhcpv6') || L.hasSystemFeature('odhcpd'), m, s, o, ss, so; - let noi18nstrings = { - etc_ethers: '/etc/ethers', - }; - - function customi18n(template, values) { - if (!values) - values = noi18nstrings; - return template.replace(/\{(\w+)\}/g, (match, key) => values[key] || match); - }; - m = new form.Map('dhcp', _('DHCP')); s = m.section(form.TypedSection, 'dnsmasq'); @@ -375,9 +365,8 @@ return view.extend({ // Begin files s.taboption('files', form.Flag, 'readethers', - customi18n(_('Use {etc_ethers}') ), - customi18n(_('Read {etc_ethers} to configure the DHCP server.') ) - ); + _('Use %s').format('/etc/ethers'), + _('Read %s to configure the DHCP server.').format('/etc/ethers')); s.taboption('files', form.Value, 'leasefile', _('Lease file'),